package org.grow.pointcolor.widget;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.swing.*;
import java.awt.*;

@Configuration
public class SimpleComponent {
    @Bean(name = "xTextField")
    public JFormattedTextField xTextField(){
        JFormattedTextField x = new JFormattedTextField();
        x.setText("1280");
        x.setMaximumSize(new Dimension(80, 50));
        x.setMinimumSize(new Dimension(80, 50));
        x.setPreferredSize(new Dimension(80, 50));
        return x;
    }
    @Bean(name = "yTextField")
    public JFormattedTextField yTextField(){
        JFormattedTextField y = new JFormattedTextField();
        y.setText("768");
        y.setMaximumSize(new Dimension(80, 50));
        y.setMinimumSize(new Dimension(80, 50));
        y.setPreferredSize(new Dimension(80, 50));
        return y;
    }
    @Bean(name = "outTextField")
    public JFormattedTextField outTextField(){
        JFormattedTextField y = new JFormattedTextField();
        y.setText("color");
        y.setMaximumSize(new Dimension(200, 50));
        y.setMinimumSize(new Dimension(150, 50));
        y.setPreferredSize(new Dimension(180, 50));
        return y;
    }
}
